<?php
    $this->headTitle('Danh mục rao vặt','append');
?>
<div class="dashboard-menu dashboard-admin">
    <span class="back">&nbsp;</span>
    <h1>Danh mục rao vặt cấp 2</h1>
        <a class="btn btn-danger" href="<?php echo $this->url(array('module'=>'admin', 'controller'=>'productitem', 'action'=>'add'));?>">
            Thêm mới
        </a>
</div>
<div class="row placeholders">
    <div class="col-md-12">
        <div class="widget-big">
            <div class="table table-responsive">
                <div class="search-result">
                    <table class="table table-bordetext-danger table-striped table-condensed table-hover" border="0" cellspacing="0" cellpadding="0">
                        <thead>
                            <tr class="warning">
                                <th style="width:10%;">ID</th>
                                <th style="width:30%;">Danh Mục Cấp 1</th>
                                <th style="width:30%;">Tên Danh Mục</th>
                                <th style="width:10%;">Thứ tự</th>
                                <th style="width:10%;">Ẩn/Hiện</th>                                                                
                                <th style="width:10%;">Chức năng</th>
                            </tr>
                        </thead>
                        <tbody>
                        <?php
                            foreach ($this->itemList as $item){
                        ?>
                            <tr>
                                <td style="width:10%;" class="text-left"><?php echo $item['id'];?></td>
                                <td style="width:30%;" class="text-left"><?php echo $item['catName'];?></td>
                                <td style="width:30%;" class="text-left"><?php echo $item['name'];?></td>
                                <td style="width:10%;" class="text-left"><?php echo $item['ord'];?></td>                                                                                               
                                <td style="width:10%;" class="text-left">
                                    <?php                                        
                                        if($item['display']==1){
                                            echo '<span class="glyphicon glyphicon-ok" style="color:green"></span>';
                                        }else{
                                            echo '<span class="glyphicon glyphicon-remove" style="color:red"></span>';        
                                        }
                                    ?>                                     
                                </td>
                                <td style="width:10%;" class="text-left">                                
                                    <a class="glyphicon glyphicon-pencil" href="<?php echo $this->url(array('module'=>'admin', 'controller'=>'productitem', 'action'=>'edit', 'id'=>$item['id']))?>" title="Sửa danh mục cấp 1"></a>
                                    &nbsp;&nbsp;                                
                                    <a class="glyphicon glyphicon-remove" href="<?php echo $this->url(array('module'=>'admin', 'controller'=>'productitem', 'action'=>'delete', 'id'=>$item['id']))?>" title="Xoá danh mục cấp 1"></a>
                                </td>
                            </tr>
                        <?php
                            } 
                        ?>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>